Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.14] Backport PoV-reclaim fixes (#5273, #5281) #5371

Merged

Conversation

skunert
Copy link
Contributor

@skunert skunert commented Aug 15, 2024

Backports #5273 & #5281

gui1117 and others added 2 commits August 15, 2024 11:32
The code do reduce or increase the weight by comparing
`benchmarked_weight` and `consumed_weight`.

But `benchmarked_weight` is the pre dispatch weight. not the post
dispatch weight that is actually written into the block weight by
`CheckWeight`.

So in case the consumed weight was: `pre dispatch weight > consumed
weight > post dispatch weight` then the reclaim code was reducing the
block weight instead of increasing it.

Might explain this issue even better
#5229

@skunert
@s0me0ne-unkn0wn

(cherry picked from commit 862860e)
This PR adds an additional defensive check to the reclaim SE.

Since it can happen that we miss some storage accesses on other SEs
pre-dispatch, we should double check
that the bookkeeping of the runtime stays ahead of the node-side
pov-size.

If we discover a mismatch and the node-side pov-size is indeed higher,
we should set the runtime bookkeeping to the node-side value. In cases
such as #5229, we would stop including extrinsics and not run `on_idle`
at least.

cc @gui1117

---------

Co-authored-by: command-bot <>
(cherry picked from commit 055eb53)
@skunert skunert requested a review from a team as a code owner August 15, 2024 09:37
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: check-tracing
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7030663

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable-int
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7030662

@EgorPopelyaev EgorPopelyaev merged commit 21a1bf8 into release-crates-io-v1.14.0 Aug 15, 2024
30 of 91 checks passed
@EgorPopelyaev EgorPopelyaev deleted the skunert/backport-1.14-pov-reclaim branch August 15, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants